@extends('backend::layout')
@section('title',$page_title)
@push('styles')
    <link href="{{asset(config('view.plugin').'/layui/layui_ext/cascader/cascader.css')}}" rel="stylesheet">
@endpush
@section('content')
    @component('backend::component.form.form')
        @slot('page_title') {{$page_title}} @endslot
        @slot('formId') add-brand @endslot
        @slot('action') {{route('b_ShopBrand_create')}} @endslot

        @component('backend::component.form.form-group')
            @slot('title') 品牌名称 @endslot
            @component('backend::component.form.input')
                @slot('name') name @endslot
            @endcomponent
        @endcomponent

        @component('backend::component.form.form-group')
            @slot('title') 品牌logo @endslot
            @component('backend::component.upload.upload_img')
                @slot('name') logo @endslot
                @slot('title') 上传图片 @endslot
                @slot('img_num')1 @endslot
                @slot('group') brand @endslot
            @endcomponent
        @endcomponent

        @component('backend::component.form.form-group')
            @slot('title') 品牌官网 @endslot
            @component('backend::component.form.input')
                @slot('name') url @endslot
                @slot('value') # @endslot
            @endcomponent
            @slot('remark')可以不填 @endslot
        @endcomponent

        @component('backend::component.form.form-group')
            @slot('title') 描述 @endslot
            @component('backend::component.form.input')
                @slot('name') description @endslot
            @endcomponent
        @endcomponent

        @component('backend::component.form.form-group')
            @slot('title') 排序 @endslot
            @component('backend::component.form.input')
                @slot('name') sort @endslot
                @slot('value') 1000 @endslot
            @endcomponent
        @endcomponent

        @component('backend::component.form.form-group')
            @slot('title') 热销品牌 @endslot
            <div>
                @foreach(['0'=>'否','1'=>'是'] as $value=>$title)
                    @component('backend::component.radio')
                        @slot('title') {{$title}} @endslot
                        @slot('name') is_hot @endslot
                        @slot('value') {{$value}} @endslot
                        @if($value == 0)
                            @slot('checked') checked @endslot
                        @endif
                    @endcomponent
                @endforeach
            </div>
        @endcomponent
        @component('backend::component.form.form-group')
            @slot('title') 状态 @endslot
            <div>
                @foreach(['0'=>'禁用','1'=>'启用'] as $value=>$title)
                    @component('backend::component.radio')
                        @slot('title') {{$title}} @endslot
                        @slot('name') status @endslot
                        @slot('value') {{$value}} @endslot
                        @if($value == 1)
                            @slot('checked') checked @endslot
                        @endif
                    @endcomponent
                @endforeach
            </div>
        @endcomponent
        @slot('buttons')
            @component('backend::component.form.button')
                @slot('title') 提交 @endslot
                @slot('params') {"formId":"#add-brand"} @endslot
                @slot('class') btn-min-width ajax-form @endslot
            @endcomponent
            @component('backend::component.form.button')
                @slot('title') 重置 @endslot
                @slot('type') reset @endslot
                @slot('color') danger @endslot
                @slot('class') btn-min-width @endslot
            @endcomponent
        @endslot
    @endcomponent
@endsection
@include('backend::component.upload.upload_js')